<?php
namespace Home\Model;
use Think\Model;

/**
 * 合同表模型
 */
class StationContractModel extends BaseModel {

    protected $tableName = 'tp_station_contract';

    /**
     * 生成新合同
     * @author cheng
     */
    public function saveContract($data, $f_station_id) {
        $info = $this->where(['f_station_id' => $f_station_id])->find();
        empty($info) && $result = $this->add($data);
        return $result;
    }
}
